$("#mark-follow").click(function(event)
{
	mark_follow();
});

$("#cancel-follow").click(function(event)
{
	cancel_follow();
});

function mark_follow()
{
    $.post("{{ request.HOME_PAGE_URL }}people/{{people.id}}/follow/mark_follow/",
    {},
    function(data)
    {
    	if(data.status=="success")
    	{
    	    $("#mark-follow").attr("style","display:none");//修改style
    	    $("#cancel-follow").attr("style","display:block");
    	}
    	else
    	{
    		alert(data.status);
    	}
    },
    "json"
);}
    
function cancel_follow()
{
    $.post("{{ request.HOME_PAGE_URL }}people/{{people.id}}/follow/cancel_follow/",
    {},
    function(data)
    {
    	if(data.status=="success")
    	{
    	    $("#cancel-follow").attr("style","display:none");
    	    $("#mark-follow").attr("style","display:block");
    	}
    	else
    	{
    		alert(data.status);
    	}
    },
    "json"
);}